<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="/static/css/icon.css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/weui.css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/weui2.css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/style.css"/>
    <script src="/static/js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
    <script src="/static/js/zepto.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/static/js/picker.js" type="text/javascript" charset="utf-8"></script>
    <script src="/static/js/vue.js" type="text/javascript" charset="utf-8"></script>
    <script src="/static/js/all.js" type="text/javascript" charset="utf-8"></script>
</head>
<body class="white">
<div id="content">

    <div class="topBox">
        <div class="top top1">
            <div class="sign"><img src="/static/img/paid.png"/></div>
            <div class="title">
                <p class="smallTitle">今日实收款: <span class="redWord">¥ {{ payment_total }}</span> 上周同日: <span
                        class="blackWord">¥ {{ last_week_recharge_total or 0 }}</span></p>
            </div>
        </div>
    </div>
    <div class="cont">
        <div class="core core1">
            <table class="main">
                <thead>
                <tr>
                    <th>支付方式</th>
                    <th>今日</th>
                    <th>单数</th>
                    <th>上周同日</th>
                </tr>
                </thead>
                <tbody>
                {% for data in data_list %}
                <tr>
                    <td>{{ data['支付方式'] }}</td>
                    <td>¥ {{ data['今日支付金额'] }}</td>
                    <td>{{ data['今日单数'] }}</td>
                    <td>¥ {{ data['上周支付金额'] }}</td>
                </tr>
                {% endfor %}
                </tbody>
            </table>
        </div>
    </div>

    <section class="weui-menu">
        <div class="weui-menu-inner {% if not week %}now{% endif %}">
            <span><a
                    href="{{ set_url_param({'start_date':now_date,'end_date':now_date,"week":None}) }}">今日</a></span>
        </div>
        <div class="weui-menu-inner {% if week  %}now{% endif %}">
            <span><a
                    href="{{ set_url_param({'week':1,'start_date':this_week_monday,'end_date':this_week_sunday}) }}">本周</a></span>
        </div>
        <div class="weui-menu-inner" style="display: none">
            <em></em>
            <span>自定义</span>
            <ul>
                <em></em>
                <li>昨天</li>
            </ul>
        </div>
    </section>
</div>
<script>
    $(function () {
        $('.weui-menu-inner').click(function () {
            var $menu = $(this).find('ul'),
                    height = $menu.find('li').length * 40 + 15 + 'px',
                    opacity = $menu.css('opacity');

            $('.weui-menu-inner ul').css({
                'top': '0',
                'opacity': '0'
            });

            if (opacity == 0) {
                $menu.css({
                    'top': '-' + height,
                    'opacity': 1
                });
            } else {
                $menu.css({
                    'top': 0,
                    'opacity': 0
                });
            }
        });
    });

</script>
</body>
</html>
